<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
    'id'=>'theme-form',
    'enableAjaxValidation'=>false,
)); ?>

    <p class="note">Поля з <span class="required">*</span> обов'язкові до заповнення.</p>

    <?php echo $form->errorSummary($model); ?>

    <div class="row">
        <?php echo $form->labelEx($model,'parent_id'); ?>
        <?php 
            $parent_ids = Theme::getParentThemes();
        ?>
        <?php echo $form->dropDownList($model,'parent_id',$parent_ids); ?>
        <?php echo $form->error($model,'parent_id'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model,'prev'); ?>
        <?php //echo $form->textField($model,'prev',array('size'=>11,'maxlength'=>11)); ?>
        <?php 
            $prev_ids = Theme::getParentThemes();
        ?>
        <?php echo $form->dropDownList($model,'prev',$prev_ids); ?>
        <?php echo $form->error($model,'prev'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model,'next'); ?>
        <?php //echo $form->textField($model,'next',array('size'=>11,'maxlength'=>11)); ?>
        <?php 
            $next_ids = Theme::getParentThemes();
        ?>
        <?php echo $form->dropDownList($model,'next',$next_ids); ?>
        <?php echo $form->error($model,'next'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model,'title'); ?>
        <?php echo $form->textField($model,'title',array('size'=>60,'maxlength'=>255)); ?>
        <?php echo $form->error($model,'title'); ?>
    </div>  
    <div class="row">
        <?php echo $form->labelEx($model,'body'); ?>
        <?php // echo $form->textArea($model,'body',array('rows'=>6, 'cols'=>50)); ?>
                <?php $this->widget('application.extensions.fckeditor.FCKEditorWidget',array(
                "model"=>$model,                # Data-Model
                "attribute"=>'body',           # Attribute in the Data-Model
                "height"=>'600px',
                "width"=>'790px',
                "toolbarSet"=>'',          # EXISTING(!) Toolbar (see: fckeditor.js)
                "fckeditor"=>Yii::app()->basePath."/../../fckeditor/fckeditor.php",
               // "fckeditor"=>Yii::app()->baseUrl."/fckeditor/fckeditor.php",
                                                # Path to fckeditor.php
                "fckBasePath"=>Yii::app()->baseUrl."/fckeditor/",
                                                # Realtive Path to the Editor (from Web-Root)
                "config" => array(
                    "EditorAreaCSS"=>Yii::app()->baseUrl.'/css/index.css',),
                                                # http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
                                                # Additional Parameter (Can't configure a Toolbar dynamicly)
                ) ); ?>
        <?php echo $form->error($model,'body'); ?>
    </div>

    <div class="row buttons">
        <?php echo CHtml::submitButton($model->isNewRecord ? 'Створити' : 'Зберегти'); ?>
    </div>

<?php $this->endWidget(); ?>
</div><!-- form -->